<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = []
        // 打印空数组会显示undefined
        console.log(arr[0])
        // 向数组arr中加入数据
        arr[0] = 3
        console.log(arr[0])
        // 修改相应数组数据
        arr[0] = 4
        console.log(arr[0])

    </script>
</body>

</html>